<?php

class m130630_150417_add_table_currencies extends CDbMigration
{
	public function up()
	{
		$this->createTable('currencies', array(
			'id' => 'pk',
			'name' => 'varchar(50)',
			'code' => 'varchar(45)',
			'rate' => 'float not null'
		), 'ENGINE = InnoDB
			DEFAULT CHARACTER SET = utf8
			COLLATE = utf8_unicode_ci');
	}

	public function down()
	{
		$this->dropTable("currencies");
		return true;
	}

	/*
	// Use safeUp/safeDown to do migration with transaction
	public function safeUp()
	{
	}

	public function safeDown()
	{
	}
	*/
}